package com.lucas.demo.abstractfactory;

import com.lucas.demo.factory.Circle;
import com.lucas.demo.factory.Rectangle;
import com.lucas.demo.factory.Shape;

/**
 * @author Lucas
 * @date 2021/7/28 下午5:17
 */
public class ShapeFactory extends AbstractFactory{
    @Override
    public Color getColor(String color) {
        return null;
    }

    @Override
    public Shape getShape(String shapeType) {
        if(shapeType == null){
            return null;
        }
        if(shapeType.equalsIgnoreCase("CIRCLE")){
            return new Circle();
        } else if(shapeType.equalsIgnoreCase("RECTANGLE")){
            return new Rectangle();
        }
        return null;
    }
}
